import pandas as pd
from dotenv import load_dotenv
import os
load_dotenv()
path = 'https://docs.google.com/spreadsheets/d/{0}/export?gid=0&format=csv'
id = os.getenv("id")
df = pd.read_csv(path.format(id)).dropna()
print(df.shape)
df.columns
(28, 12)
Index(['Nome', 'Q1', 'Q2', 'Q3', 'Q4', 'Q5', 'Q6', 'Q7', 'Q8', 'Q9', 'Q10',
'Nota'],
dtype='object')
import plotly.express as px
import matplotlib.pyplot as plt
for name in df.columns.values:
if df[name].dtype == 'float64' or df[name].dtype == 'int64':
fig = px.histogram(df[name], title = name, labels = {
"count" : "Número de Alunos",
"value" : "Nota",
})
fig.show()
df2 = df.melt(id_vars="Nome")
#display(df2)
fig = px.box(df2, x = "variable", y = "value")
fig.show()